package benchmarks.tpch.redis;

import api.Configuration;
import benchmarks.tpch.TPCHQuery;
import benchmarks.tpch.TPCHWorker;
import benchmarks.tpch.redis.queries.*;

public class TPCHWorkerRedis extends TPCHWorker {
    public TPCHWorkerRedis(Configuration config) {
        super(config);
    }

    public TPCHQuery makeQueryImpl(String queryName) {
        if (queryName.equals("Q1")) {
            return new Q1Redis();
        }
        else if (queryName.equals("Q8")){
            return new Q8Redis();
        }
        else if (queryName.equals("Q15")){
            return new Q15Redis();
        }
        else if (queryName.equals("Q20")){
            return new Q20Redis();
        }
        else if (queryName.equals("Q21")){
            return new Q21Redis();
        }
        else if (queryName.equals("Q22")){
            return new Q22Redis();
        } else {
            throw new RuntimeException("Unknown Query of " + queryName);
        }
    }
}
